home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / MSG Demo 1.2 Source / MSG Demo ƒ / MSG Shell ƒ / msg prefs.h < prev    next >
Text File  |  1993-11-10  |  2KB  |  77 lines

  1. /**********************************************************************\
  2.  
  3. File:        msg prefs.h
  4.  
  5. Purpose:    This is the header file for msg prefs.c
  6.  
  7.  
  8. MSG Demo -- graphic effects demonstration program
  9. Copyright (C) 1992-3 Mark Pilgrim & Dave Blumenthal
  10.  
  11. This program is free software; you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation; either version 2 of the License, or
  14. (at your option) any later version.
  15.  
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. GNU General Public License for more details.
  20.  
  21. You should have received a copy of the GNU General Public License
  22. along with this program in a file named "GNU General Public License".
  23. If not, write to the Free Software Foundation, 675 Mass Ave,
  24. Cambridge, MA 02139, USA.
  25.  
  26. \**********************************************************************/
  27.  
  28. #include "Folders.h"
  29.  
  30. #define        PREFS_FILE_NAME            "\pMSG Demo Prefs"
  31. #define        PREFS_TYPE                'PREF'
  32. #define        CREATOR                    'MSG0'
  33. #define        PREFS_HEADER_VERSION    1
  34.  
  35. extern    Boolean            gCanSavePrefs;
  36. extern    Str255            gMyName;
  37. extern    Str255            gMyOrg;
  38.  
  39. typedef struct
  40. {
  41.     char            regname[40];
  42.     char            regorg[40];
  43.     unsigned char    sound;
  44.     char            unused;
  45.     long            fileID;
  46. } PrefStruct;
  47.  
  48. int PreferencesInit(void);
  49. void PrefsError(int err);
  50. int OpenPrefsFile(int *prefsFileID);
  51. int SetupNewPrefsFile(int prefsFileID);
  52. void ClosePrefsFile(int prefsFileID);
  53. int GetNextPrefs(int prefsFileID);
  54. int SavePrefs(int prefsFileID);
  55. int CheckVersion(int prefsFileID);
  56. int GetFileID(void);
  57. int CheckFileID(void);
  58. int Virgin(int prefsFileID);
  59. void DefaultPrefs(void);
  60. void CopyGlobalsToPrefs(void);
  61. void CopyPrefsToGlobals(void);
  62. void GetRegistration(void);
  63. void SaveThePrefs(void);
  64.  
  65. enum
  66. {
  67.     prefs_allsWell=0,
  68.     prefs_diskReadErr=-1,
  69.     prefs_diskWriteErr=-2,
  70.     prefs_cantOpenPrefsErr=-3,
  71.     prefs_cantCreatePrefsErr=-4,
  72.     prefs_noMorePrefsErr=-5,
  73.     prefs_versionNotSupportedErr=-6,
  74.     prefs_virginErr=-7,
  75.     prefs_IDNotMatchErr=-8
  76. };
  77.